/* 竖排展示 demo 行间距 16px */
.tdesign-demo-block-column {
  display: flex;
  flex-direction: column;
  row-gap: 16px;
}

/* 竖排展示 demo 行间距 32px */
.tdesign-demo-block-column-large {
  display: flex;
  flex-direction: column;
  row-gap: 32px;
}

/* 横排排展示 demo 列间距 16px */
.tdesign-demo-block-row {
  display: flex;
  column-gap: 16px;
  align-items: center;
}

body.light-theme {
  background-image: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1950&q=80'); /* 新的浅色主题背景图片 */
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

body.blue-theme {
  background-image: url('https://images.unsplash.com/photo-1492455523216-a8715cacd682?auto=format&fit=crop&w=1950&q=80'); /* 新的蓝色主题背景图片 */
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center; 
}

body.dark-theme {
  background-image: url('https://images.unsplash.com/photo-1519681393784-d120267933ba?auto=format&fit=crop&w=1950&q=80'); /* 新的深色主题背景图片 */
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

body.nature-theme {
  background-image: url('https://images.unsplash.com/photo-1501785888041-af3ef285b470?auto=format&fit=crop&w=1950&q=80'); /* 新的自然主题背景图片 */
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

/* 隐藏主题切换时的遮罩层 */
.t-dialog-mask, /* 可能的遮罩层类名 */
.theme-mask {
  display: none !important;
}

/* 新的整体容器样式 */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 30px;
  box-sizing: border-box;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  transition: background-image 0.5s ease-in-out;
}

/* 工具栏样式更新，按钮统一样式和颜色 */
.toolbar {
  display: flex;
  justify-content: flex-end; /* 按钮靠右排列 */
  gap: 15px;
  margin-bottom: 25px;
}

.toolbar-button {
  font-size: 16px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 25px;
  transition: background-color 0.3s, transform 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.toolbar-button:hover {
  transform: translateY(-2px);
}

/* 分享按钮样式 */
.share-button {
  background-color: #474af5; /* 绿色 */
  color: white;
  border: none;
}

.share-button:hover {
  background-color: #6f89fd;
}

/* 主题切换按钮样式 */
.theme-button {
  background-color: #0ff0ac; /* 紫色 */
  color: white;
  border: none;
}

.theme-button:hover {
  background-color: #5bf0f5; /* 深紫色 */
  color: white;
}

/* 导出按钮样式 */
.download-button {
  background-color: #fc1ca6; /* 蓝色 */
  color: white;
  border: none;
}

.download-button:hover {
  background-color: #f88df3;
}

/* 聊天窗口样式优化 */
.chat-window {
  flex: 1;
  border: none;
  border-radius: 16px;
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: background-color 0.3s ease;
}

/* 聊天气泡的通用样式 */
.chat-bubble {
  max-width: 70%;
  padding: 10px 15px;
  border-radius: 15px;
  margin-bottom: 10px;
  word-wrap: break-word;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  font-size: 16px;
  line-height: 1.5;
  transition: background-color 0.3s, transform 0.2s;
}

.chat-bubble:hover {
  transform: scale(1.02);
}

/* 用户消息气泡 */
.user-bubble {
  background-color: #e1ffc7; /* 浅绿色 */
  align-self: flex-end;
  border-top-right-radius: 0;
}

/* 助手消息气泡 */
.assistant-bubble {
  background-color: #f1f0f0; /* 浅灰色 */
  align-self: flex-start;
  border-top-left-radius: 0;
}

/* 旅游达人专属样式 */
.assistant-bubble {
  background-color: #d1e7dd; /* 更柔和的绿色 */
  border-left: 4px solid #0f5132; /* 绿色边框 */
}

.assistant-bubble::before {
  content: '';
  position: absolute;
  top: 10px;
  left: -10px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-right: 10px solid #d1e7dd;
  border-bottom: 10px solid transparent;
}

/* 头像样式 */
.t-chat-item .t-avatar {
  border: 2px solid #0f5132; /* 绿色边框 */
}

/* 反馈按钮样式修改 */
.feedback-action {
  display: flex;
  gap: 10px;
}

.feedback-action .t-button {
  background: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 20px;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.feedback-action .t-button:hover {
  background-color: rgba(24, 144, 255, 0.1);
}

.active-good {
  color: #007bff; /* 赞按钮选中时的颜色，如蓝色 */
  border-color: #007bff;
}

.active-bad {
  color: #dc3545; /* 踩按钮选中时的颜色，如红色 */
  border-color: #dc3545;
}

/* 调整聊天底部布局 */
.input-area {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
  border-top: 1px solid #f0f0f0;
}

.chat-input {
  flex: 1;
  border-radius: 20px;
  padding: 10px 20px;
  border: 1px solid #ccc;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.chat-input:hover,
.chat-input:focus {
  border-color: #2196f3;
  box-shadow: 0 0 5px rgba(33, 150, 243, 0.5);
}

/* 停止按钮样式 */
.stop-button {
  background-color: #f44336; /* 红色 */
  color: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  transition: background-color 0.3s, transform 0.2s;
}

.stop-button:hover {
  background-color: #e53935;
  transform: scale(1.1);
}

/* 更新后的反馈表单对话框样式 */
.feedback-dialog {
  .t-dialog__header {
    background-color: #2196f3; /* 蓝色头部 */
    color: #ffffff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    font-size: 18px;
    text-align: center;
  }

  .t-dialog__body {
    padding: 25px;
    background-color: #e3f2fd; /* 淡蓝色背景 */
  }

  .t-dialog__footer {
    background-color: #e3f2fd;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
  }
}

.submit-feedback-button {
  width: 100%;
  border-radius: 20px;
  padding: 10px 0;
  background-color: #4caf50; /* 绿色 */
  color: white;
  transition: background-color 0.3s;
}

.submit-feedback-button:hover {
  background-color: #43a047;
}

.cancel-feedback-button {
  background-color: #f44336; /* 红色 */
  color: white;
  border-radius: 20px;
  padding: 10px 0;
  margin-right: 10px;
  transition: background-color 0.3s;
}

.cancel-feedback-button:hover {
  background-color: #e53935;
}

.feedback-textarea {
  width: 100%;
  border: 1px solid #2196f3;
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

.feedback-textarea:hover,
.feedback-textarea:focus {
  border-color: #64b5f6;
}

/* 分享对话框样式 */
.share-dialog {
  .t-dialog__header {
    background-color: #ff9800; /* 橙色头部 */
    color: #ffffff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    font-size: 18px;
    text-align: center;
  }

  .t-dialog__body {
    padding: 20px;
    background-color: #fff3e0; /* 淡橙色背景 */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .share-dialog__footer {
    display: none; /* 移除对话框底部 */
  }
}

.share-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.share-text-input {
  width: 100%;
  height: 100px;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
  font-size: 16px;
  transition: border-color 0.3s;
}

.share-text-input:hover,
.share-text-input:focus {
  border-color: #2196f3;
}

.share-image-upload {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
}

.image-preview {
  position: relative;
  width: 100%;
  max-height: 200px;
  overflow: hidden;
  border-radius: 8px;
  margin-top: 10px;
}

.image-preview img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.remove-image-button {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  padding: 4px;
  cursor: pointer;
}

.remove-image-button:hover {
  background-color: rgba(255, 255, 255, 1);
}

.submit-share-button {
  width: 100%;
  border-radius: 20px;
  padding: 10px 0;
  background-color: #6642e9; /* 紫色 */
  color: white;
  transition: background-color 0.3s;
}

.submit-share-button:hover {
  background-color: #9d8af0;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .chat-container {
    padding: 20px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .chat-bubble {
    max-width: 80%;
  }

  .feedback-dialog,
  .share-dialog {
    width: 90% !important;
  }

  .toolbar-button {
    font-size: 14px;
    padding: 6px 12px;
  }

  .chat-bubble {
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 15px;
  }

  .feedback-content p {
    font-size: 16px;
  }

  .feedback-textarea {
    padding: 10px;
    font-size: 15px;
  }

  .share-button {
    font-size: 14px;
    padding: 8px 0;
  }

  .share-text-input,
  .share-image-upload {
    font-size: 14px;
  }

  .submit-share-button {
    font-size: 16px;
    padding: 8px 0;
  }
}